import request from '@/utils/request'

// 查询流量包列表
export function listPackage(data) {
  return request({
    url: '/sys/dataPackage/getAll',
    method: 'post',
    data: data
  })
}

// 查询流量包详细
export function getPackage(id) {
  return request({
    url: '/sys/dataPackage/getOne?id=' + id,
    method: 'get'
  })
}

// 新增流量包
export function addPackage(data) {
  return request({
    url: '/car/package',
    method: 'post',
    data: data
  })
}

// 修改流量包
export function updatePackage(data) {
  return request({
    url: '/sys/dataPackage/edit',
    method: 'post',
    data: data
  })
}

// 删除流量包
export function delPackage(data) {
  return request({
    url: '/sys/dataPackage/delete',
    method: 'post',
    data:data
  })
}
// 查询效果详情
export function effectDetails(id) {
  return request({
    url: `/sysPacketEffect/selectOne?id=${id}`,
    method: 'get'
  })
}

// 查询效果列表
export function effectList(data) {
  return request({
    url: '/sysPacketEffect/selectAll',
    method: 'post',
    data:data
  })
}

// 新增效果
export function addEffect(data) {
  return request({
    url: '/sysPacketEffect/add',
    method: 'post',
    data: data
  })
}

// 修改流量包
export function updateEffect(data) {
  return request({
    url: '/sysPacketEffect/update',
    method: 'post',
    data: data
  })
}

// 删除效果
export function delEffect(data) {
  return request({
    url: '/sysPacketEffect/delete',
    method: 'post',
    data:data
  })
}
